#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <stdlib.h>

int main()
{
    printf("我是运行main函数的进程：%d，ppid:%d\n", getpid(), getppid());
    pid_t id = fork();
    if(id == 0)
    {
        printf("我是main函数进程的子进程:%d, ppid:%d\n", getpid(), getppid());
        while(1);
        exit (1);
    }
    while(1);
    return 0;
}
